package zoo;

public class Animal implements Biology{
    private String name;
    private int age;
    private int id;
    private Breeder zooBreeder;
    public Animal(String name,int id) {
        this.name = name;
        this.id = id;
    }
    public Animal(String name, int age, int idnumber, Breeder zooBreeder) {
        this.zooBreeder=zooBreeder;
        this.name = name;
        this.age = age;
        this.id = idnumber;
    }
    public String getName() {
        return name;
    }
    public int getAge() {
        return age;
    }
    public void setName(String name) {
        this.name = name;
    }
    public void setAge(int age) {
        this.age = age;
    }
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }

    public String getZooBreeder() {
        return zooBreeder.getName();
    }

    public void setZooBreeder(Breeder zooBreeder) {
        this.zooBreeder = zooBreeder;
    }

    @Override
    public void eat() {
        System.out.println(this.getName() + "正在吃饭");
    }

    @Override
    public void sleep() {
        System.out.println(this.getName()+"正在睡觉");
    }

    @Override
    public void run() {
        System.out.println(this.getName()+"正在奔跑");
    }
}
